<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>用户管理</title>
<link rel="Stylesheet" href="../css/main.css" type="text/css" />
<script type="text/javascript">
	rids = eval({#$rids#});
</script>
<script type="text/javascript" src="../js/jquery.js"></script>
<script type="text/javascript" src="../home/js/navbar.js"></script>
<script type="text/javascript" src="../home/js/useradmin.js"></script>
</head>
<body>
<div class="pagecontent">
	<div class="pagehead">
		{#include_php file='../home/head.php' once=true#}
	</div>
	<div class="pagebody">
		<div class="bodyleft">
			{#include_php file='../home/navbar.php' once=true#}
		</div>		
		<div class="bodyright">
			<h2>用户管理</h2>
			<div class="sepline"></div>
			<div class="bakhellp">
				<p class="msgok">点任意一个添加链接将会进入添加用户界面</p>
				<p class="msgok">点删除将会删除当前用户</p>
				<p class="msgok">点修改将会进入修改用户信息界面</p>
			</div>
			<div>
				<!--{section name=c loop=$users}-->
				<!--{if $smarty.section.c.index%2 == 0}-->
				<ul class="userinfoleft">
					<li>
						<div class="userlefttext">用户名ID：</div>
						<div class="usertxt">{#$users[c].uid#}</div>
						<div style="clear:both;"></div>
					</li>
					<li>
						<div class="userlefttext">用户名： </div>
						<div class="usertxt">{#$users[c].uname#}</div>
						<div style="clear:both;"></div>
					</li>
					<li>
						<div class="userlefttext">职位： </div>
						<div class="usertxt">{#$users[c].job#}</div>
						<div style="clear:both;"></div>
					</li>
					<li>
						<div class="userlefttext">登录次数：</div>
						<div class="usertxt">{#$users[c].logincount#}</div>
						<div style="clear:both;"></div>
					</li>
					<li>
						<div class="userlefttext">注册时间：</div>
						<div class="usertxt">{#$users[c].regtime|date_format:"%Y-%m-%d %H:%M:%S"#}</div>
						<div style="clear:both;"></div>
					</li>
					<li>
						<div class="userlefttext">最后登录：</div>
						<div class="usertxt">{#$users[c].lastlogin|date_format:"%Y-%m-%d %H:%M:%S"#}</div>
						<div style="clear:both;"></div>
					</li>
					<li class="sepline2"></li>
					<li>
						<ul>
							<li><label for="useradmin{#$users[c].uid#}">用户管理权限</label><input type="checkbox" name="useradmin{#$users[c].uid#}" id="useradmin{#$users[c].uid#}" /></li>
							<li><label for="addproduct{#$users[c].uid#}">添加焊接数据权限</label><input type="checkbox" name="addproduct{#$users[c].uid#}" id="addproduct{#$users[c].uid#}" /></li>
							<li>
								<div>
									<span style="float:left;">车辆类型管理权限：&nbsp;</span>
									<span style="float:right;">
										<input type="checkbox" name="addtype{#$users[c].uid#}" id="addtype{#$users[c].uid#}" /><label for="addtype{#$users[c].uid#}">添加</label>&nbsp;
										<input type="checkbox" name="modifytype{#$users[c].uid#}" id="modifytype{#$users[c].uid#}" /><label for="modifytype{#$users[c].uid#}">修改</label>&nbsp;
										<input type="checkbox" name="deletetype{#$users[c].uid#}" id="deletetype{#$users[c].uid#}" /><label for="deletetype{#$users[c].uid#}">删除</label>
									</span>										
								</div>
								<div style="clear:both; "></div>
							</li>
							<li class="sepline2"></li>
							<!--{foreach from=$products item=product}-->
							<li>
								<div>
									<span style="float:left;">{#$product.pid#} 号数据：&nbsp;</span>
									<span style="float:right;">
										<input type="checkbox" name="viewproduct{#$product.pid#}_{#$users[c].uid#}" id="viewproduct{#$product.pid#}_{#$users[c].uid#}" /><label for="viewproduct{#$product.pid#}_{#$users[c].uid#}">查看</label>&nbsp;
										<input type="checkbox" name="modifyproduct{#$product.pid#}_{#$users[c].uid#}" id="modifyproduct{#$product.pid#}_{#$users[c].uid#}" /><label for="modifyproduct{#$product.pid#}_{#$users[c].uid#}">修改</label>&nbsp;
										<input type="checkbox" name="deleteproduct{#$product.pid#}_{#$users[c].uid#}" id="deleteproduct{#$product.pid#}_{#$users[c].uid#}" /><label for="deleteproduct{#$product.pid#}_{#$users[c].uid#}">删除</label>
									</span>										
								</div>
								<div style="clear:both;"></div>
							</li>
							<!--{foreachelse}-->
							<li>还没有焊接数据呢！请以后再设置该用户的焊接数据权限</li>
							<!--{/foreach}-->
						</ul>
					</li>
					<li class="linkli"><a href="../home/adduser.php">添加</a>&nbsp;|&nbsp;<a href="../home/modifyuser.php?uid={#$users[c].uid#}">修改</a>&nbsp;|&nbsp;<a class="_deleteuser" href="../home/dodeleteuser.php?uid={#$users[c].uid#}">删除</a></li>
				</ul>
				<!--{else}-->
				<ul class="userinforight">
					<li>
						<div class="userlefttext">用户名ID：</div>
						<div class="usertxt">{#$users[c].uid#}</div>
						<div style="clear:both;"></div>
					</li>
					<li>
						<div class="userlefttext">用户名： </div>
						<div class="usertxt">{#$users[c].uname#}</div>
						<div style="clear:both;"></div>
					</li>
					<li>
						<div class="userlefttext">职位： </div>
						<div class="usertxt">{#$users[c].job#}</div>
						<div style="clear:both;"></div>
					</li>
					<li>
						<div class="userlefttext">登录次数：</div>
						<div class="usertxt">{#$users[c].logincount#}</div>
						<div style="clear:both;"></div>
					</li>
					<li>
						<div class="userlefttext">注册时间：</div>
						<div class="usertxt">{#$users[c].regtime|date_format:"%Y-%m-%d %H:%M:%S"#}</div>
						<div style="clear:both;"></div>
					</li>
					<li>
						<div class="userlefttext">最后登录：</div>
						<div class="usertxt">{#$users[c].lastlogin|date_format:"%Y-%m-%d %H:%M:%S"#}</div>
						<div style="clear:both;"></div>
					</li>
					<li class="sepline2"></li>
					<li>
						<ul>
							<li><label for="useradmin{#$users[c].uid#}">用户管理权限</label><input type="checkbox" name="useradmin{#$users[c].uid#}" id="useradmin{#$users[c].uid#}" /></li>
							<li><label for="addproduct{#$users[c].uid#}">添加焊接数据权限</label><input type="checkbox" name="addproduct{#$users[c].uid#}" id="addproduct{#$users[c].uid#}" /></li>
							<li>
								<div>
									<span style="float:left;">车辆类型管理权限：&nbsp;</span>
									<span style="float:right;">
										<input type="checkbox" name="addtype{#$users[c].uid#}" id="addtype{#$users[c].uid#}" /><label for="addtype{#$users[c].uid#}">添加</label>&nbsp;
										<input type="checkbox" name="modifytype{#$users[c].uid#}" id="modifytype{#$users[c].uid#}" /><label for="modifytype{#$users[c].uid#}">修改</label>&nbsp;
										<input type="checkbox" name="deletetype{#$users[c].uid#}" id="deletetype{#$users[c].uid#}" /><label for="deletetype{#$users[c].uid#}">删除</label>
									</span>										
								</div>
								<div style="clear:both; "></div>
							</li>
							<li class="sepline2"></li>
							<!--{foreach from=$products item=product}-->
							<li>
								<div>
									<span style="float:left;">{#$product.pid#} 号数据：&nbsp;</span>
									<span style="float:right;">
										<input type="checkbox" name="viewproduct{#$product.pid#}_{#$users[c].uid#}" id="viewproduct{#$product.pid#}_{#$users[c].uid#}" /><label for="viewproduct{#$product.pid#}_{#$users[c].uid#}">查看</label>&nbsp;
										<input type="checkbox" name="modifyproduct{#$product.pid#}_{#$users[c].uid#}" id="modifyproduct{#$product.pid#}_{#$users[c].uid#}" /><label for="modifyproduct{#$product.pid#}_{#$users[c].uid#}">修改</label>&nbsp;
										<input type="checkbox" name="deleteproduct{#$product.pid#}_{#$users[c].uid#}" id="deleteproduct{#$product.pid#}_{#$users[c].uid#}" /><label for="deleteproduct{#$product.pid#}_{#$users[c].uid#}">删除</label>
									</span>										
								</div>
								<div style="clear:both;"></div>
							</li>
							<!--{foreachelse}-->
							<li>还没有焊接数据呢！请以后再设置该用户的焊接数据权限</li>
							<!--{/foreach}-->
						</ul>
					</li>
					<li class="linkli"><a href="../home/adduser.php">添加</a>&nbsp;|&nbsp;<a href="../home/modifyuser.php?uid={#$users[c].uid#}">修改</a>&nbsp;|&nbsp;<a class="_deleteuser" href="../home/dodeleteuser.php?uid={#$users[c].uid#}">删除</a></li>
				</ul>
				<!--{/if}-->
				<!--{if $smarty.section.c.index%2 == 1 || $smarty.section.c.last}-->
				<div style="clear:both;"></div>
				<!--{/if}-->
				<!--{if $smarty.section.c.index%2 == 1 && !$smarty.section.c.last}-->
				<div class="sepline" style="margin:0px 25px 0px 25px;"></div>
				<!--{/if}-->
				<!--{/section}-->
			</div>
		</div>		
	</div>	
	<div class="pagetail">
	{#include_php file='../home/footer.php' once=true#}
	</div>
</div>
</body>
</html>